package chouxiangfangfa;

public abstract class Animal {
    public abstract void run();
    public void breath(){
        System.out.println("呼吸");
        run();//虽然说不能调抽象类，但是多肽，最后执行的Dog/Cat里面的run
    }
    public Animal(){

    }
}
class Cat extends Animal{

    @Override
    public void run() {
        System.out.println("猫跑");
    }

}
class Dog extends Animal{

    @Override
    public void run() {
        System.out.println("狗跑");
    }
}
